//
//  NSDate+NSDateAddition.h
//  NJYouthOlypic
//
//  Created by Xiu on 6/24/13.
//  Copyright (c) 2013 Xiu. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (NSDateAddition)

+ (NSDate*)dateFromString:(NSString*)dateStr
                formatted:(NSString*)format;

- (BOOL)isSameDayTo:(NSDate*)date;

- (NSDate*)thisDay;
- (NSDate*)prevDay;
- (NSDate*)nextDay;


/**
 * Formatted as 2012-01-01
 */
- (NSDate*)formatedDateFrom:(NSDate*)date;

/**
 * @return
 *  string as "08:12 AM"
 */
- (NSString*)formattedTimeString:(BOOL)is24Hour;

- (NSString*)stringFormattedAsddMMyyyyHHmm;


/**
 * Get the day of week. Such as Sunday, Monday, etc.
 */
- (NSString*)dayOfWeek;

- (BOOL)isLarerThan:(NSDate*)date;
- (BOOL)isLessThan:(NSDate*)date;

- (NSInteger)day;
- (NSInteger)month;
- (NSInteger)year;
- (NSInteger)hour;
- (NSInteger)min;

@end
